<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui"
	template="/WEB-INF/template/crud.xhtml">

	<ui:param name="idForm" value="frmOrderService" />
	<ui:param name="prependId" value="false" />
	<ui:param name="backingBeanName" value="#{serviceOrderBean}" />
	<ui:param name="panelHeader" value="#{msgs['label.solicitationServiceOrder']}" />
	<ui:param name="complementTitle" value="#{msgs['label.serviceOrder']}" />

	<ui:define name="toolBar">
		<p:toolbar>
			<p:toolbarGroup>
				<p:commandButton id="btnSolicit" value="#{msgs['label.solicit']}" icon="ui-icon-circle-check"
					actionListener="#{serviceOrderBean.solicit}" />
			</p:toolbarGroup>
		</p:toolbar>
	</ui:define>
	<ui:define name="spaceFields">
		<h:panelGrid columns="2" styleClass="panelGrid">
			<h:outputLabel value="#{msgs['label.description']}:" />
			<h:outputLabel value="#{msgs['label.dateOfSolicitation']}:" />

			<p:inputText value="#{serviceOrderBean.domain.description}" maxlength="80" styleClass="inputText"
				required="#{serviceOrderBean.requiredOnInsEdi}" disabled="#{serviceOrderBean.disabledOnDefaultPreview}"
				onkeyup="toUpperCase(this);" requiredMessage="#{msgs['msg.error.required.description']}" />

			<h:outputText value="#{serviceOrderBean.domain.dateSolicitation}">
				<f:convertDateTime pattern="dd/MM/yyyy HH:mm" locale="#{localeBean.locale}" />
			</h:outputText>

			<h:outputLabel for="userSolicited" value="#{msgs['label.userSolicited']}:" />
			<p:selectOneMenu id="userSolicited" value="#{serviceOrderBean.domain.solicited}" converter="defaultConverter"
				required="#{serviceOrderBean.requiredOnInsEdi}">
				<f:selectItem noSelectionOption="true" itemLabel="#{msgs['label.select']}" />
				<f:selectItems value="#{serviceOrderBean.listUserSolicited}" var="obj" itemLabel="#{obj.name}" />
			</p:selectOneMenu>

			<h:outputLabel value="#{msgs['label.userSolicitant']}:" />
			<h:outputText value="#{serviceOrderBean.domain.solicitant}" />

			<h:outputLabel value="#{msgs['label.statusOS']}:" />
			<ui:param name="keyStatusOS" value="#{serviceOrderBean.domain.statusOS.description}"/>
			<h:outputText value="#{msgs[keyStatusOS]}" />
		</h:panelGrid>
	</ui:define>

	<ui:define name="table">
	</ui:define>
</ui:composition>